package javabean.MerchantInfo;

import cn.hutool.core.annotation.Alias;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@Data
@ApiModel(description = "结算业务配置")
public class SettleConfig {

    @Alias("settle_cycle")
    @ApiModelProperty(value = "结算周期【D1：下个自然日结算， T1：下个工作日结算； 示例值：T1】", required = true)
    @NotBlank(message = "settleCycle不能为空")
    @Length(min = 1, max = 2, message = "settleCycle 长度范围：1~2")
    private String settleCycle;

    @Alias("min_amt")
    @ApiModelProperty(value = "起结金额【账户余额大于等于起结金额才会发起结算；;单位元，需保留小数点后两位，取值范围[0.00，99999999999.99]。;示例值：1000.00】", required = false)
    @Length(min = 1, max = 14, message = "minAmt 长度范围：1~14")
    private String minAmt;

    @Alias("remained_amt")
    @ApiModelProperty(value = "留存金额【该部分资金不会结算。;单位元，需保留小数点后两位，取值范围[0.00，99999999999.99]。;示例值：1000.00】", required = false)
    @Length(min = 1, max = 14, message = "remainedAmt 长度范围：1~14")
    private String remainedAmt;

    @Alias("settle_abstract")
    @ApiModelProperty(value = "结算摘要【可自定义结算打款备注，不填默认为空；支持配置格式化摘要内容，参见结算配置示例说明；示例值：汇付商城业务】", required = false)
    @Length(min = 1, max = 128, message = "settleAbstract 长度范围：1~128")
    private String settleAbstract;

    @Alias("out_settle_flag")
    @ApiModelProperty(value = "手续费外扣标记【1:外扣，结算时从out_settle_huifuid账户扣手续费;2:内扣，从结算金额中扣手续费，默认为内扣;示例值：2】", required = false)
    @Length(min = 1, max = 1, message = "outSettleFlag 长度范围：1~1")
    private String outSettleFlag;

    @Alias("out_settle_huifuid")
    @ApiModelProperty(value = "结算手续费外扣商户号【填写承担手续费的汇付商户号；当out_settle_flag=1时必填，否则非必填；示例值：6666000123123123】", required = false)
    @Length(min = 1, max = 18, message = "outSettleHuifuid 长度范围：1~18")
    private String outSettleHuifuid;

    @Alias("out_settle_acct_type")
    @ApiModelProperty(value = "结算手续费外扣账户类型【01：基本户（不填默认取值）；05：充值户；09：营销户；示例值：01】", required = false)
    @Length(min = 1, max = 2, message = "outSettleAcctType 长度范围：1~2")
    private String outSettleAcctType;

    @Alias("settle_pattern")
    @ApiModelProperty(value = "结算方式【P0：批次结算 ，P1：定时结算 ，E1:中信E管家 ，示例值：P1;批次结算指按照指定结算批次号进行资金结算，自定义时间结算是指按照商户指定到账时间进行资金结算。两种结算方式需二选一，不填默认P0：批次结算；】", required = false)
    @Length(min = 1, max = 2, message = "settlePattern 长度范围：1~2")
    private String settlePattern;

    @Alias("settle_batch_no")
    @ApiModelProperty(value = "结算批次号【当settle_pattern=P0批次结算时必填，即将按指定结算批次号进行资金结算；示例值：100；参见结算批次说明】", required = false)
    @Length(min = 1, max = 16, message = "settleBatchNo 长度范围：1~16")
    private String settleBatchNo;

    @Alias("is_priority_receipt")
    @ApiModelProperty(value = "是否优先到账【当settle_pattern=P0时选填，不填默认为N，该值在结算那批次号[0-500]间生效;Y：是，N：否，示例值：Y】", required = false)
    @Length(min = 1, max = 1, message = "isPriorityReceipt 长度范围：1~1")
    private String isPriorityReceipt;

    @Alias("settle_time")
    @ApiModelProperty(value = "自定义结算处理时间【当settle_pattern=P1自定义时间结算时必填；注意：00:00到00:30不能指定;到账时间，格式：HHmmss；示例值：103000】", required = false)
    @Length(min = 1, max = 6, message = "settleTime 长度范围：1~6")
    private String settleTime;

    @Alias("fixed_ratio")
    @ApiModelProperty(value = "节假日结算手续费率【settle_cycle为D1时必填。单位%，需保留小数点后两位。取值范围[0.00，100.00]，不收费请填写0.00；;settle_cycle=T1时，不生效 ；settle_cycle为D1时，遇节假日按此费率结算 ；示例值：0.05】", required = false)
    @Length(min = 1, max = 6, message = "fixedRatio 长度范围：1~6")
    private String fixedRatio;

    @Alias("constant_amt")
    @ApiModelProperty(value = "节假日结算手续费固定金额【settle_cycle为D1时必填。单位元，需保留小数点后两位。不收费请填写0.00；;settle_cycle结算周期为D1时，遇节假日按此费率结算 ；;示例值：1.00】", required = false)
    @Length(min = 1, max = 15, message = "constantAmt 长度范围：1~15")
    private String constantAmt;

    @Alias("workday_fixed_ratio")
    @ApiModelProperty(value = "工作日结算手续费率【单位%，需保留小数点后两位。取值范围[0.00，100.00]，不填默认为0.00；示例值：0.05】", required = false)
    @Length(min = 1, max = 6, message = "workdayFixedRatio 长度范围：1~6")
    private String workdayFixedRatio;

    @Alias("workday_constant_amt")
    @ApiModelProperty(value = "工作日结算手续费固定金额【单位元，需保留小数点后两位。不填默认为0.00；示例值：1.00】", required = false)
    @Length(min = 1, max = 15, message = "workdayConstantAmt 长度范围：1~15")
    private String workdayConstantAmt;

}